import mongoose from 'mongoose';

const AwardSchema = new mongoose.Schema(
  {
    userid: { type: mongoose.Schema.Types.ObjectId, ref: 'User' },
    amount: Number,
    des: String,
    create_time: Date
  },
  { versionKey: false }
);

AwardSchema.index({ userid: 1 });

const Award = mongoose.model('Award', AwardSchema);

export { Award };
